﻿@model IEnumerable<HdipCricketClub.Models.Fixture>

@{
    ViewBag.Title = "Select Fixture to Review:";
}

<h2>@ViewBag.Title</h2>

<table>
    <tr>
        <th>
            Team:
        </th>
        <th>
            Opponent:
        </th>
        <th>
            Date
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Team.name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Opponent.club_name) @Html.DisplayFor(modelItem => item.Opponent.team_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.date)
        </td>
        <td>
            @Html.ActionLink("Select", "GetTeam", new { id = item.fixture_id })
        </td>
    </tr>
}

</table>

<p>
    @ViewBag.Message
</p>
<p>
    @Html.ActionLink("Return to Home Page", "Index", "Home")
</p>
